#pragma once


#include "Vec3.h"
#include <string>
using namespace std;

class Mat4;
class Quaternion
{
public:

	Quaternion(float px = 0, float py = 0, float pz = 0, float pw = 1);
	Quaternion(const Quaternion&) = default;
	Quaternion(Quaternion&&) = default;
	Quaternion& operator=(const Quaternion&) = default;
	Quaternion& operator=(Quaternion&&) = default;

	//
	Quaternion& Set(float px, float py, float pz, float pw);
	Quaternion& Normalize();
	Quaternion& Multiply(const Quaternion& other);
	float Length();
	Quaternion& Conjugate();
	Vec3 QuaternionToEuler();
	Mat4 ToMat4() const;
	string ToString();
	// Quaternion& operator*(const Quaternion& rhs);

	//----------------------------------------
	// static
	// static Quaternion Multiply(const Quaternion& lhs, const Quaternion& rhs);
	static Quaternion Euler(float degressX,float degressY,float degressZ);
	static Quaternion Euler(const Vec3& degress);
	
public:
	float x = 0;
	float y = 0;
	float z = 0;
	float w = 1;
};

Quaternion operator*(const Quaternion& lhr, const Quaternion& rhs);